package com.dg.cuckoo.admin.repository;


import com.dg.cuckoo.admin.dto.basicInformation.projectInformation.BasicProjectDto;
import com.dg.cuckoo.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户存储库
 *
 * @author InTime
 */
@Repository
public interface BasicProjectRepository extends BaseRepository<BasicProjectDto, String> {

    BasicProjectDto findByMainName(String mainName);

    BasicProjectDto findByProjectCode(String projectCode);

    @Query(value = "select * from basic_project limit ?,?",nativeQuery = true)
    List<BasicProjectDto> page(Integer page, Integer pageSize);

    List<BasicProjectDto> findByMainNameContaining(String mainName);


    List<BasicProjectDto> findByCodingTime(String codingTime);

}